fix(FR-2901): sync deployment revision state in Relay store after activate / auto-activate#7428
Merged
graphite-app[bot] merged 1 commit intoMay 15, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Relay store synchronization gaps after mutations that change a deployment's currentRevisionId / deployingRevisionId, ensuring the revision history table tags and Configuration Section indicators stay consistent with server state without requiring a manual refresh.
Changes:
- Extend the
activateDeploymentRevisionmutation response inDeploymentRevisionHistoryTab.tsxto includedeployingRevisionIdplus...DeploymentRevisionDetail_revisionon bothcurrentRevisionanddeployingRevision, so the normalized deployment record updates atomically. - In
DeploymentAddRevisionModal.tsx, add a temporaryrefetchDeploymentRevisionStateAfterAutoActivatehelper (best-effortfetchQuery) that runs afteraddModelRevisionwithautoActivate: truein both Custom and Preset modes, untilAddRevisionPayload.deploymentis exposed by the backend. - The bulk of the diff carries over changes from the stacked PR #7407 (resource group at deployment level, new
ModelReplicastatus fields, preset detail modal architecture, i18n updates for 22 locales, etc.).
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
react/src/components/DeploymentRevisionHistoryTab.tsx |
Extends activate mutation selection with deployingRevisionId / deployingRevision + revision detail fragments; switches notifications from upsertNotification to message; removes resource-group column and filter. |
react/src/components/DeploymentAddRevisionModal.tsx |
Adds best-effort post-activate refetch helper for the auto-activate path; large refactor from stacked PR (preset mode now calls addModelRevision, hides RG selector, on-demand preset detail fetch, etc.). |
react/src/components/DeploymentConfigurationSection.tsx, DeploymentDetailPage.tsx, VFolderNodes.tsx, VFolderNodesV2.tsx, ModelCardDrawer.tsx |
Migrate Button onClick → BAIButton action for modal-mounting transitions; add local Suspense boundaries around lazy-mounted modals. |
react/src/components/ModelCardDeployModal.tsx, VFolderDeployModal.tsx |
Switch to useFragment-based preset list; use Antd modal okButtonProps / confirmLoading instead of in-body footer; defer query with useDeferredValue; preserve afterClose for auto-deploy null-render path. |
react/src/components/DeploymentPresetDetailModal.tsx |
Move preset name into modal title. |
react/src/components/DeploymentList.tsx, DeploymentReplicasTab.tsx, DeploymentRevisionDetail.tsx, ReplicaStatusTag.tsx |
Add Deployment ID / Revision number columns, new replica status / trafficStatus / healthStatus columns, expanded ReplicaStatus enum with WARMING_UP/RUNNING/FAILED_TO_START. |
react/src/components/DeploymentSettingModal.tsx, SessionFormItems/ResourceAllocationFormItems.tsx |
Add resource group selector (read-only in edit mode) at deployment level; add hideResourceGroupFormItem prop. |
react/src/pages/DeploymentListPage.tsx |
Set autoUpdateDelay={15_000} on the fetch-key button. |
data/schema.graphql |
Schema updates from stacked PR (new ResourceGroup on ModelDeploymentMetadata, ReplicaHealthStatus/TrafficStatus, deprecation of inference runtime config queries, etc.). |
resources/i18n/*.json (22 files) |
Add RevisionAdded, WarmingUp, FailedToStart, Running, Terminated tooltips; remove CurrentRevisionAvailableTitle / NameAndID; localize ActivePool; update DeployFailed/DeploySuccess wording. |
daf2e1d to
65e1324
Compare
This was referenced May 15, 2026
Member
Author
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
3bbd576 to
36cfa9c
Compare
agatha197
requested changes
May 15, 2026
Contributor
agatha197
left a comment
There was a problem hiding this comment.
please change merge target branch to 05-13-feat__move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui
dc98ec8 to
e2b6b31
Compare
36cfa9c to
2a7da32
Compare
Merge activity
|
…ivate / auto-activate (#7428) Resolves #7427(FR-2901) Stacked on #7407. ## Summary After mutations that change a deployment's `currentRevisionId` / `deployingRevisionId`, the Relay store's deployment record can fall out of sync with the server, causing the row tags in the revision history table and the Configuration Section's "current / deploying" panels to drift apart from what the server thinks. Two specific gaps were addressed: - **`activateDeploymentRevision` (Revision History → Deploy)** — Mutation response previously returned only `deployment { id, currentRevisionId, currentRevision { id } }`. Extended to include `deployingRevisionId` and `...DeploymentRevisionDetail_revision` fragment on both `currentRevision` and `deployingRevision @SInCE(version: "26.4.3")`, so the normalized deployment record updates atomically. Consumers (`DeploymentDetailPage`, `DeploymentConfigurationSection`, `DeploymentRevisionHistoryTab` row tags) all share the same Relay store record and re-render on the next render pass. - **`addModelRevision` (Add Revision modal, both Preset and Custom modes)** — Now that the backend exposes `ModelRevision.deployment` (lablup/backend.ai#11631 / BA-6056), the mutation reaches into `revision.deployment @SInCE(version: "26.4.4")` and selects `currentRevisionId`, `deployingRevisionId`, `currentRevision`, `deployingRevision`, so the deployment node is updated unconditionally on every revision add. No `autoActivate` branching — Relay normalizes the shared deployment node either way. - The previous client-side `fetchQuery` workaround helper is removed. - The `revision` selection itself was reduced to `id` + `...DeploymentRevisionDetail_revision`. The previously inlined fields (`resourceConfig.resourceOpts`, `modelRuntimeConfig.runtimeVariantId`, `modelDefinition.models[].service.preStartActions / shell / healthCheck.expectedStatusCode`, etc.) were dead selections — none of the response handlers read them, and the actual consumers (`AdminDeploymentPresetSettingPageContent`, `AdminDeploymentPresetModelConfigItem`, `DeploymentPresetDetailModal`) have their own queries. - **`data/schema.graphql`** — Regenerated to add `ModelRevision.deploymentId: ID!` and `ModelRevision.deployment: ModelDeployment` per the merged backend PR. ## Test plan - [ ] Open a deployment detail with multiple revisions in the Revision History tab. Click **Deploy** on a non-current revision → confirm the "Current" / "배포중" row tags AND the Configuration Section's `currentRevision` / `deployingRevision` panels both update without a manual refresh. - [ ] From the same page open **Add Revision** modal in either Preset or Custom mode with **Auto activate ON** → submit → modal closes, success toast shows. Verify the Configuration Section moves to "deploying" state and the new revision appears as `deployingRevision` without a manual refresh. - [ ] Same flow with **Auto activate OFF** → deployment record is still refreshed by the mutation (no autoActivate branching). `deployingRevisionId` typically stays unchanged on the server side; UI should show the new revision in history without an orphan "deploying" state. - [ ] Backend lifecycle: leave the page idle while a deploying revision becomes current. The 5s `useInterval` polling in `DeploymentConfigurationSection` continues to work because `deployingRevision` is correctly populated immediately after the mutation. ## Backend dependency Requires backend manager with [lablup/backend.ai#11631](lablup/backend.ai#11631) (BA-6056) — `ModelRevision.deployment` / `ModelRevision.deploymentId`. Older managers without the field will see the `@since(version: "26.4.4")` directive strip the field at request time, falling back to no auto-update for `addModelRevision` (the activate path is unaffected).
e2b6b31 to
aaff679
Compare
2a7da32 to
1a73c68
Compare
7 tasks
Base automatically changed from
05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui
to
main
May 15, 2026 08:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves #7427(FR-2901)
Stacked on #7407.
Summary
After mutations that change a deployment's
currentRevisionId/deployingRevisionId, the Relay store's deployment record can fall out of sync with the server, causing the row tags in the revision history table and the Configuration Section's "current / deploying" panels to drift apart from what the server thinks. Two specific gaps were addressed:activateDeploymentRevision(Revision History → Deploy) — Mutation response previously returned onlydeployment { id, currentRevisionId, currentRevision { id } }. Extended to includedeployingRevisionIdand...DeploymentRevisionDetail_revisionfragment on bothcurrentRevisionanddeployingRevision @since(version: "26.4.3"), so the normalized deployment record updates atomically. Consumers (DeploymentDetailPage,DeploymentConfigurationSection,DeploymentRevisionHistoryTabrow tags) all share the same Relay store record and re-render on the next render pass.addModelRevision(Add Revision modal, both Preset and Custom modes) — Now that the backend exposesModelRevision.deployment(feat(BA-6056): expose deployment_id and deployment Node on ModelRevision backend.ai#11631 / BA-6056), the mutation reaches intorevision.deployment @since(version: "26.4.4")and selectscurrentRevisionId,deployingRevisionId,currentRevision,deployingRevision, so the deployment node is updated unconditionally on every revision add. NoautoActivatebranching — Relay normalizes the shared deployment node either way.fetchQueryworkaround helper is removed.revisionselection itself was reduced toid+...DeploymentRevisionDetail_revision. The previously inlined fields (resourceConfig.resourceOpts,modelRuntimeConfig.runtimeVariantId,modelDefinition.models[].service.preStartActions / shell / healthCheck.expectedStatusCode, etc.) were dead selections — none of the response handlers read them, and the actual consumers (AdminDeploymentPresetSettingPageContent,AdminDeploymentPresetModelConfigItem,DeploymentPresetDetailModal) have their own queries.data/schema.graphql— Regenerated to addModelRevision.deploymentId: ID!andModelRevision.deployment: ModelDeploymentper the merged backend PR.Test plan
currentRevision/deployingRevisionpanels both update without a manual refresh.deployingRevisionwithout a manual refresh.deployingRevisionIdtypically stays unchanged on the server side; UI should show the new revision in history without an orphan "deploying" state.useIntervalpolling inDeploymentConfigurationSectioncontinues to work becausedeployingRevisionis correctly populated immediately after the mutation.Backend dependency
Requires backend manager with lablup/backend.ai#11631 (BA-6056) —
ModelRevision.deployment/ModelRevision.deploymentId. Older managers without the field will see the@since(version: "26.4.4")directive strip the field at request time, falling back to no auto-update foraddModelRevision(the activate path is unaffected).